package utils 
{
	import flash.geom.Rectangle;
	/**
	 * ...
	 * @author Jeroen Gildemacher
	 */
	public class BoundariesHelper 
	{
		public static const bounds:Rectangle = new Rectangle (0, -200, 1000, 1200);
		
		public function BoundariesHelper() 
		{
			
			
		}
		
		public static function getY(y:int):int {
			if (y < bounds.top) {
				return bounds.top;
			} else if (y>bounds.bottom){
				return bounds.bottom;
			} else {
				return y;
			}
		}
		public static function getX(x:int):int {
			if (x < bounds.left) {
				return bounds.right-x;
			} else if (x>bounds.right){
				return x-bounds.right;
			} else {
				return x;
			}
		}
		
	}

}